//从命令行读取内容
const readline = require('readline');
let question = 'Do you want to install vue (yes/no):';
const questionInterface = readline.createInterface({
    input: process.stdin,
    output: process.stdout
});

questionInterface.question(question, answer=>{
    questionInterface.close();
    console.log(typeof answer);
    let normalAns = answer.toLowerCase().startsWith('y');
    if(!normalAns){
        console.log(`you need to install vue manually`);
    }else{
       //执行命令
       console.log(`Installing vue:`)
    }
})